//
//  ViewController.m
//  下拉菜单0
//
//  Created by 徐宏飞 on 16/4/20.
//  Copyright © 2016年 徐宏飞. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (nonatomic, strong) NSArray *array;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.view.backgroundColor = [UIColor colorWithRed:0.900 green:1.000 blue:0.884 alpha:1.000];
    
    _array = @[@[@"小学", @"中学", @"大学"], @[@"一年", @"二年", @"三年"], @[@"一班",@"二班", @"三班", @"四班"], @[@"一班",@"二班", @"三班", @"四班"]];
    
    
    NSLog(@"lisi");
    
    
    MXPullDownMenu *menu = [[MXPullDownMenu alloc] initWithArray:_array selectedColor:[UIColor colorWithRed:0.102 green:0.659 blue:0.144 alpha:1.000] Frame:CGRectMake(0, 64, 400, 80)];
    menu.delegate = self;
    
    [self.view addSubview:menu];
    
    
}


-(void)PullDownMenu:(MXPullDownMenu *)pullDownMenu didSelectRowAtColumn:(NSInteger)column row:(NSInteger)row{
    
    NSLog(@"选中的是第%ld组, 第%ld个", column, row);
    NSLog(@"%@", [_array[column] objectAtIndex:row]);
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
